# /*
#  *  Copyright 2021 籽籮籮 籵籮籮籯类籲籷籰
#  *
#  *  This includes splay Copyright (C) 1998-2021 Free Software Foundation, Inc.
#  *  This includes Copyright (C) 2008, 2011 Matthias Stallmann, Saurabh Gupta.
#  *  This includes Copyright (C) 2009 MiptVis GNU GPL version 3+ Boris Shurygin
#  *  Junio H Hamano gitster@pobox.com
#  *
#  *  This program is free software: you can redistribute it and/or modify
#  *  it under the terms of the GNU General Public License as published by
#  *  the Free Software Foundation, either version 3 of the License, or
#  *  (at your option) any later version.
#  *
#  *  This program is distributed in the hope that it will be useful,
#  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  *  GNU General Public License for more details.
#  *
#  *  You should have received a copy of the GNU General Public License
#  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
#  *
#  *  These are the four essential freedoms with GNU GPL software:
#  *  1: freedom to run the program, for any purpose
#  *  2: freedom to study how the program works, and change it to make it do what you wish
#  *  3: freedom to redistribute copies to help your Free Software friends
#  *  4: freedom to distribute copies of your modified versions to your Free Software friends
#  *   ,           ,
#  *  /             \
#  * ((__-^^-,-^^-__))
#  * `-_---'  `---_-'
#  *  `--|o`   'o|--'
#  *      \  `  /
#  *       ): :(
#  *       :o_o:
#  *        "-"
#  *
#  * SPDX-License-Identifier: GPL-3.0+
#  * License-Filename: LICENSE
#  */

#
bin_PROGRAMS=gmlt

#
gmlt_SOURCES = \
	main.c \
	rhp.c \
	dpmem.c \
	splay-tree.c \
	gml.c \
	hier.c \
	uniqstr.c \
	uniqnode.c

#
gmlt$(EXEEXT): $(gmlt_SOURCES)
	rm -f ./gmlt
	$(CC) $(gmlt_CFLAGS) $(gmlt_SOURCES) -I. -I.. $(gml4t_tolink) -lm -o gmlt
	$(CC) --version

# create the parser code
parsers:
	gcc ./packcc.c -o packcc
	./packcc gml.peg

#
indent:
	./lindent.sh $(gmlt_SOURCES) main.h gml.h rhp.h hier.h uniqstr.h uniqnode.h
	touch *

#
clean-generic:
	rm -v -f *.bc
	rm -v -f ./massif.out.*
	rm -v -f ./*.rhp.txt
	rm -v -f ./a.out
	rm -v -f *~
	rm -v -f ./*.so.1
	rm -v -f ./*.o
	rm -v -f ./*.a
	rm -v -f ./*.i
	rm -v -f ./*.s
	rm -v -f ./O
	rm -v -f ./OO
	rm -v -f ./O1
	rm -v -f ./O2
	rm -v -f ./O3
	rm -v -f ./ID
	rm -v -f ./dsmake.output
	rm -v -f ./dsmake.warnings
	rm -v -f ./dsmake.errors
	rm -v -f *.dot
	rm -v -f *.ll
	rm -v -f *.*r.*
	rm -v -f *.*t.*
	rm -v -f *.bc
	rm -v -f *.plist
	rm -v -f *.ps
	rm -v -f ./*.exe
	rm -v -f jsonlint
	rm -v -f ./*.gk*
	rm -v -f ./*.out
	rm -v -f ./*.res
	rm -v -f *.scallgraph.gv
	rm -v -f -r .deps
	rm -v -f *graph-info.gv
	rm -v -f *graph-info.svg
	rm -v -f *graph-info.ci
	rm -v -f *.ci
	rm -v -f ./spt
	rm -v -f gmlt
	rm -v -f packcc

# end.
